namespace DotNetNuke.Framework
{
    using DotNetNuke.UI.Utilities;
    using System;
    using System.Web.UI;

    /// -----------------------------------------------------------------------------
    /// Project	 : DotNetNuke
    /// Class	 : CDefault
    /// 
    /// -----------------------------------------------------------------------------
    /// <summary>
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// [sun1]	1/19/2004	Created
    /// </history>
    /// -----------------------------------------------------------------------------
    public class CDefault : PageBase
    {
        public string Author = "";
        public string Comment = "";
        public string Copyright = "";
        public string Description = "";
        public string Generator = "";
        public string KeyWords = "";
        public string Title = "";

        ~CDefault()
        {
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Allows the scroll position on the page to be moved to the top of the passed in control.
        /// </summary>
        /// <param name="objControl">Control to scroll to</param>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// [Jon Henning]	3/30/2005	Created
        /// </history>
        /// -----------------------------------------------------------------------------
        public void ScrollToControl(Control objControl)
        {
            if (ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.Positioning))
            {
                ClientAPI.RegisterClientReference(this, ClientAPI.ClientNamespaceReferences.dnn_dom_positioning);
                ClientAPI.RegisterClientVariable(this, "ScrollToControl", objControl.ClientID, true);
                DNNClientAPI.AddBodyOnloadEventHandler(this.Page, "__dnn_setScrollTop();");
            }
        }
    }
}

